﻿namespace WMS6.Web.Inventory
{
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using WMS6.Web;

    public class PCMaintenanceQuery : BasePage
    {
        protected Button btnExport;
        protected Button btnList;
        protected Button btnSearch;
        protected DropDownList ddlCountQTY;
        protected DropDownList ddlLoc;
        protected DropDownList ddlLot;
        protected DropDownList ddlLpnID;
        protected DropDownList ddlOwnerID;
        protected DropDownList ddlPhysicalRequestID;
        protected DropDownList ddlSkuID;
        protected DropDownList ddlTagNo;
        protected DropDownList ddlTaskDetailID;
        protected DropDownList ddlTeamNo;
        protected HtmlForm F5550;
        protected HtmlInputHidden hdnActionID;
        protected Label lblCountQTY;
        protected Label lblLoc;
        protected Label lblLot;
        protected Label lblLpnID;
        protected Label lblOwnerID;
        protected Label lblPhysicalRequestID;
        protected Label lblReceiptQuery;
        protected Label lblSkuID;
        protected Label lblTagNo;
        protected Label lblTaskDetailID;
        protected Label lblTeamNo;
        protected HtmlLink mycss;
        protected TextBox txtCountQTY;
        protected TextBox txtLoc;
        protected TextBox txtLot;
        protected TextBox txtLpnID;
        protected TextBox txtOwnerID;
        protected TextBox txtPhysicalRequestID;
        protected TextBox txtSkuID;
        protected TextBox txtTagNo;
        protected TextBox txtTaskDetailID;
        protected TextBox txtTeamNo;

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Server.Transfer("PCMaintenanceList.aspx", false);
        }

        public void InitDropDownLists()
        {
            base.InitQueryDDL(this.ddlPhysicalRequestID, 0);
            base.InitQueryDDL(this.ddlTagNo, 0);
            base.InitQueryDDL(this.ddlTeamNo, 0);
            base.InitQueryDDL(this.ddlOwnerID, 0);
            base.InitQueryDDL(this.ddlSkuID, 0);
            base.InitQueryDDL(this.ddlLoc, 0);
            base.InitQueryDDL(this.ddlLot, 0);
            base.InitQueryDDL(this.ddlLpnID, 0);
            base.InitQueryDDL(this.ddlCountQTY, 0);
            base.InitQueryDDL(this.ddlTaskDetailID, 0);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                base.InitPage(this.Page);
                this.InitDropDownLists();
            }
        }

        public string CountQTY
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtCountQTY.Text.Trim()))
                {
                    return base.GetParamsString(this.txtCountQTY.Text.Trim(), this.ddlCountQTY.SelectedValue);
                }
                return "";
            }
        }

        public string Loc
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtLoc.Text.Trim()))
                {
                    return base.GetParamsString(this.txtLoc.Text.Trim(), this.ddlLoc.SelectedValue);
                }
                return "";
            }
        }

        public string Lot
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtLot.Text.Trim()))
                {
                    return base.GetParamsString(this.txtLot.Text.Trim(), this.ddlLot.SelectedValue);
                }
                return "";
            }
        }

        public string LpnID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtLpnID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtLpnID.Text.Trim(), this.ddlLpnID.SelectedValue);
                }
                return "";
            }
        }

        public string OwnerID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtOwnerID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtOwnerID.Text.Trim(), this.ddlOwnerID.SelectedValue);
                }
                return "";
            }
        }

        public string PhysicalRequestID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtPhysicalRequestID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtPhysicalRequestID.Text.Trim(), this.ddlPhysicalRequestID.SelectedValue);
                }
                return "";
            }
        }

        public string SkuID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtSkuID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtSkuID.Text.Trim(), this.ddlSkuID.SelectedValue);
                }
                return "";
            }
        }

        public string TagNo
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtTagNo.Text.Trim()))
                {
                    return base.GetParamsString(this.txtTagNo.Text.Trim(), this.ddlTagNo.SelectedValue);
                }
                return "";
            }
        }

        public string TaskDetailID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtTaskDetailID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtTaskDetailID.Text.Trim(), this.ddlTaskDetailID.SelectedValue);
                }
                return "";
            }
        }

        public string TeamNo
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtTeamNo.Text.Trim()))
                {
                    return base.GetParamsString(this.txtTeamNo.Text.Trim(), this.ddlTeamNo.SelectedValue);
                }
                return "";
            }
        }
    }
}

